package com.hfjc.exception;

import com.hfjc.enums.ResultEnum;
/**
 * 自己编写异常，捕获异常的code和message
 * @author zlq
 *
 */
public class ProductException extends RuntimeException{

	private Integer code;

	public ProductException(ResultEnum resultEnum){
		super(resultEnum.getMsg());
		this.code=resultEnum.getCode();
	}
	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
	
}
